﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CuaHangLego.UI
{
    public partial class Login : UserControl
    {
        FormMain parent;

        public Login(FormMain f)
        {
            InitializeComponent();

            this.parent = f;
            this.txtU.Text = "admin";
            this.txtP.Text = "123456";
        }

        private void buttonLog_Click(object sender, EventArgs e)
        {
            if (this.txtU.Text.Equals("admin") && this.txtP.Text.Equals("123456"))
            {
                parent.EnableAll();
            }
            else
            {
                MessageBox.Show("Sai tài khoản hoặc mật khẩu!");
            }
        }
    }
}
